package com.baosight.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.baosight.common.Assist;
import com.baosight.service.QywxMenuService;
import com.baosight.service.TSUserService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping(value="/swagger")
@Api("swaggerDemoController相关的api")
public class SwaggerController {

	@Autowired
	private TSUserService tSUserService;
	
	@Autowired
	private QywxMenuService qywxMenuService;
	
	@ApiOperation(value="获取用户信息", notes="根据id来获取用户详细信息")
	@ApiImplicitParam(name = "id", value = "ID", paramType = "path", required = true, dataType = "String")
	@RequestMapping(value = "/{id}", method = RequestMethod.GET)
	public List getInfo(@PathVariable String id) {
		Assist assist = new Assist();
		//根据id查询
		assist.setRequires(Assist.andEq("qywx_menu.id", id));
		assist.setStartRow(0);
		assist.setRowSize(10);
		return qywxMenuService.selectQywxMenu(assist);
		//return tSUserService.selectTSUser(assist);
	}
}


